<%-- 
功能：获得属性值
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="probiz" tagdir="/WEB-INF/tags/probiz"%>
<%@tag import="com.probiz.estore.common.model.customer.Customer"%>
<%@tag import="com.probiz.estore.common.model.content.Content"%>
<%@tag import="com.probiz.estore.common.model.product.Product"%>
<%@ attribute name="attribute" required="true" description="属性" type="com.probiz.estore.common.model.attribute.Attribute"%>
<%@ attribute name="entity" required="true" description="one entity of Product、Customer、Content、Category、Salesorder" type="java.lang.Object" %>

<%
if(entity != null){
   if(entity instanceof Customer){
       Customer value = (Customer) entity;
       //request.setAttribute("attrValueSet",value.getCustomerAttrValues());
   }
   else if(entity instanceof Content){
       Content value = (Content) entity;
       //request.setAttribute("attrValueSet",value.getContentAttrValues());
   }
   else if(entity instanceof Product){
       Product value = (Product) entity;
       request.setAttribute("attrValueSet",value.getProductAttrValues());
   }
}   
%>

<c:if test="${not empty entity}">
	<c:forEach var="attrValueItem"  items="${attrValueSet}">
	  <c:if test="${attrValueItem.attributeId eq attribute.attributeId}">
	       <c:set var="attrValue" value="${attrValueItem}" scope="request"/>
	  </c:if>
	</c:forEach>
</c:if>
